package me.zhengjie.inter.rest;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.annotation.Log;
import me.zhengjie.business.domain.Hljg;
import me.zhengjie.business.domain.sup.Rygl;
import me.zhengjie.business.service.RyglService;
import me.zhengjie.business.service.YmkdzService;
import me.zhengjie.business.service.dto.YmkdzDto;
import me.zhengjie.business.service.dto.YmkdzQueryCriteria;
import me.zhengjie.utils.PageUtil;
import me.zhengjie.utils.SecurityUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * @author xiahongbo
 * @date 2022-07-14
 **/
@Slf4j
@RestController
@RequiredArgsConstructor
@Api(tags = "移动端查询服务项目")
@RequestMapping("/mp/fwxm")
public class MpFwxmController {

    private final YmkdzService ymkdzService;

    @GetMapping
    @ApiOperation("移动端查询服务项目")
    public ResponseEntity<Object> queryFwxm(YmkdzQueryCriteria criteria) throws IOException {

        return new ResponseEntity<>(PageUtil.toMpContent(ymkdzService.queryFwxm(criteria)), HttpStatus.OK);
    }

}
